|
|
|
|
|
|
|
Again, the only real difference is in the SQL statement and the titles, labels, and legends. Save and run the project. Your Sales by Company graph should look like the one in Figure 11.16. |
|
|
|
|
|
|
|
|
Figure 11.16.
Displaying the Sales by Company bar graph. |
|
|
|
|
|
|
|
|
Today you learned how to use the graph control that ships with Visual Basic in order to create visual displays of your data tables. You learned how to add the control to your project and how to load the graph control with data points, titles, legends, and labels. |
|
|
|
|
|
|
|
|
Also, you built a graph ActiveX DLL Object Library that you can use to display virtually any dataset in a variety of graph formats. This library lets you save the graph to disk, send the graph to the printer, or copy the graph to the Windows Clipboard for placement in other Windows programs by way of the Paste Special operation. |
|
|
|
|
|
|
|
|
While building the graph library, you learned how to declare and use enumerated constants to improve the readability of your Visual Basic code. |
|
|
|
|
|
|
|
|
Finally, you used the new graph library to add three graphs to the CompanyMaster project. |
|
|
|
|
|
|
|
|
1. List the advantages of including graphics in your Visual Basic database applications. |
|
|
|
|
|
|
|
|
2. Describe the purpose of the NumSets and NumPoints properties of the graph control. |
|
|
|
|
|
|
|
|
3. When you are using the predefined constants for graph types, is the following code correct? |
|
|
|
|
|
|
|
|
Graph1.GraphType = graphBar3d |
|
|
|
|
|